This invention relates in general to programmable logic controllers and, more particularly, to feedback systems employed in conjunction with a programmable logic controller to control a process.
Programmable logic controllers (PLC's) are a relatively recent development in process control technology. As a part of process control, a programmable logic controller is used to monitor input signals from a variety of input modules (input sensors) which report events and conditions occurring in a controlled process. For example, a PLC can monitor such input conditions as motor speed, temperature, pressure, volumetric flow and the like. A control program is stored in a memory within the PLC to instruct the PLC what actions to take upon encountering particular input signals or conditions. In response to these input signals provided by input sensors, the PLC derives and generates output signals which are transmitted to various output devices to control the process. For example, the PLC issues output signals to speed up or slow down a motor, open or close a relay, raise or lower temperature or adjust pressure as well as many other possible control functions too numerous to list.
Feedback systems are often implemented in conjunction with or within such programmable logic controllers. An example of one such conventional feedback system is shown in simplified block diagram form in FIG. 1 as feedback system 10. In system 10 it is assumed that it is desired to drive motor 15 at a selected speed. A command signal is generated to instruct motor 15 to turn at the selected speed. However, before being applied to motor 15, the command signal requires processing. The command signal is applied to the positive port of a summing junction 20. The output of summing junction 20 is applied to a control input of motor 15 via a proportional plus integral plus differential (PID) controller 25 coupled therebetween. The speed of motor 15 is sensed by sensor 30 which reports indicia of the speed of motor 15 back to the negative port of summing junction 20. If there is any difference between the actual speed of motor 15 and the speed instructed by the command signal, then a corresponding error signal is generated at the output of summing junction 20. However, once the speed of motor 15 reaches the speed instructed by the command signal, little or no error signal is generated at the output of summing junction 20.
In the example feedback system 10, PID controller 25 interprets the error signal and instructs motor 15 to turn at a speed related to that instructed by the command signal. More specifically, based on whatever error signal, if any, is applied to PID controller 25, controller 25 produces a control variable signal (CV) which includes a proportional term, an integral term and a differential term. The proportional term is related proportionally to the magnitude of the error signal at any point in time. The integral term increases in size over time when the error signal is positive and decreases in size over time when the error signal is negative. The portion of the CV signal due to the integral term actually holds the motor at the selected speed once the error has decreased to zero. The differential term is utilized in instances where it is desirable to respond to a large initial impetus such as at motor start-up or to accentuate small error signals. The particular relationship of the proportional, integral and differential terms of a particular PID controller are conveniently expressed in terms of a PID control algorithm well known to those skilled in the art.
Such a PID controller 25 as described above may be implemented within the control program which controls the operation of a programmable logic controller. In typical PID applications which require a slew rate limited output, a separate slew rate limit is placed on the output of the control variable (CV) in the form of a clamp on control variable CV. This function does not interact with the PID control algorithm in any way other than to limit the control signal before it is applied to the controlled process (motor 15, in the example of FIG. 1).
Motors and other controlled devices in a process often have finite operating limits which should not be exceeded for fear of damage to the controlled device. For example, a motor will have a rated speed limit associated therewith. One way to assure that the rated speed of the motor is never exceeded is to clamp the input of the motor such that the controlled variable signal seen by the motor never gets so large as to overspeed the motor. This will protect the motor from overspeed conditions; however, other problems may be caused by such maximum signal limits. For example, if the selected motor speed indicated by the command signal is greater than the maximum allowable motor speed, the motor speed will be limited. The motor will not reach the selected speed and the error signal at the output of the summing junction will remain present. The integrator within the PID controller will continue to integrate the error signal until the PID controller goes into saturation. In this scenario, the integral term may grow to a very large quantity and become so large that when a command signal is finally given to decrease motor speed, an unduly long time may be required to negate the accumulated value of the integral term before an appropriate CV signal is finally generated to reduce motor speed.